home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / timer.arc / TIMER.DOC < prev   
Text File  |  1985-10-10  |  4KB  |  74 lines

  1.         Assembly Language Compile Time Utility
  2.  
  3. By:                                After 10/1/85:
  4.     Daniel A. Segel                    Daniel A. Segel
  5.     1208 Pine Lane                     401 Circle Drive West
  6.     Davis,CA. 95616                    Los Angeles, Ca, 90024
  7.  
  8.  
  9. This package should have the following program:
  10.  
  11.      TIMER.COM     PROGRAM TO START AND STOP TIMER AND DISPLAY ELAPSED TIME
  12.      TIMER.DOC     THIS DOCUMENT
  13.            
  14.      This compile time utility is heavily based upon another work written
  15. by Terry Davis of Los Angeles.  His program was too useful to ignore, but
  16. it suffered from being large and in three seperate pieces (a result of
  17. it being written in the C language).  I took it upon myself to write a
  18. similar program that would overcome these limitations, and turned to
  19. assembly language as a way of making it small and complete.
  20.  
  21.      The purpose of this program is to time various events, such as 
  22. the compilation of a large program, and signal the user when the process
  23. is finished.  It then displays the starting, ending, and elapsed times.
  24. Once the timer is started it can be "stopped" at any time and the elapsed
  25. time will be displayed.  Note that the timer will remember it's starting
  26. time as long as the computer is not rebooted.  Every time you "stop" the
  27. timer, it will display the elapsed time from the starting time to that point.
  28. This program has been tested on an IBM PC and a COMPAQ under PC-DOS 2.1
  29. and 3.0, but it should work on any fairly compatable machine running PC-DOS. 
  30. See the explanation of how it works (below) if you have any doubts.
  31.  
  32.      To start the timer enter <TIMER on> with nothing following.  A 
  33. message will be displayed indicating the starting time.  At any point
  34. later on, you may obtain the elapsed time by entering <TIMER off>.  The
  35. starting and ending times will be displayed, along with the elapsed time.
  36. Note that if you enter <TIMER offb> (exactly the same except for the final
  37. b) a bell will be sounded when the elapsed time is displayed.
  38.  
  39.      This program may be placed in a batch file along with the commands
  40. used to assemble or compile your programs.  There are generally two reasons
  41. why you would want to use it: 1) you want to know how long it took to 
  42. compile or assemble your program, and 2) you want a signal that the computer
  43. is finished.  An example of how it could be used in a batch file follows:
  44.  
  45. timer on
  46. masm %1.asm,%1.obj;
  47. link %1.obj,%1.exe;
  48. exe2bin %1.exe %1.com
  49. timer offb
  50.  
  51. If this batch file were called ASM.BAT, then entering <ASM b:timer> would
  52. start the timer, assemble, link and convert to binary a program on the
  53. b: drive named timer.asm, and then tell you how long it took and beep.
  54.  
  55.  
  56.                  HOW IT WORKS
  57.  
  58. This is only a brief description.  For more information, send me a disk
  59. and I'll send you the source code.
  60.  
  61. This program uses the PC/MS-DOC function call 2cH to get the time from
  62. the system clock.  This time is then stored in memory using memory
  63. locations that are reserved for user interupts (0000:0198-0000:019C).
  64. It is unlikely that this memory is going to be used by a commercial program,
  65. but this is where compatability problems might arise.  The program can use
  66. any 8 byte area -- if it doesn't work on your computer, find an unused
  67. area of memory and write me for instructions on how to patch TIMER.COM.
  68.  
  69. The time stored in memory is retreived by the program during its off cycle,
  70. and the elapsed time is computed by subtracting starting time from ending
  71. time.  Various checks are performed to account for midnight rollover and
  72. lower ending times (i.e. ending minutes are lower than starting).
  73.  
  74.